package com.itheima.blackitheima;
//自定义泛型类
public class MyGenericityTest1 {
    public static void main(String[] args) {
        //创建Box对象,并对元素类型规定String
        Box<String> box=new Box<>();
        box.setElement("土味情话!");
        String element = box.getElement();
        System.out.println(element);

        //创建Box对象,并对元素类型规定Integer
        Box<Integer> box1=new Box<>();
        box1.setElement(1);
        System.out.println(box1.getElement());

        //创建MyClass对象
        MyClass<String,Double,Integer> myClass=new MyClass<>();
        myClass.add("a",3.14,1);

    }
}
